import Taro, {Component, Config} from '@tarojs/taro'
import { View } from '@tarojs/components'
import { SDBody } from 'sudao-ui'

import './index.less'

export default class StatisticsPage extends Component {

  config: Config = {
    navigationBarTitleText: '订货统计'
  }

  render () {
    const array1 = Array.from({length: 12}, (_, v) => v)
    const array2 = Array.from({length: 13}, (_, v) => v)
    return (
      <SDBody sd-class='container'>
        <View className="cell-list">
          {
            [1,2,3,4,5].map((_, index) => {
              return (
                <View className='cell-item' key={index}>
                  <View className="top-content">
                    <View className="top-list border-bottom_1px">
                      {
                        array1.map((_, innerIndex) => {
                          return (
                            <View className="list-item" key={innerIndex}>
                              <View className="title">10.2w</View>
                              <View className="line" style={innerIndex % 2 == 0 ? `height: 170rpx;` : 'height:136rpx;'}></View>
                            </View>
                          )
                        })
                      }
                    </View>
                    <View className="bottom-list">
                      {
                        array2.map((_, innerIndex) => {
                          return (
                            innerIndex == 12 ? (
                              <View className="b-item b-item_auto" key={innerIndex}>(月)</View>
                            ) : (
                              <View className="b-item" key={innerIndex}>{innerIndex + 1}</View>
                            )
                          )
                        })
                      }
                    </View>
                  </View>
                  <View className="bottom-content">
                    <View className="bitem">2018年</View>
                    <View className="bitem bitem_red">￥2,856.800</View>
                  </View>
                </View>
              )
            })
          }
        </View>
      </SDBody>
    )
  }
}
